home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / STANDALO / BOUNCE_C / BOUNCE.H < prev    next >
Text File  |  1990-08-24  |  1KB  |  53 lines

  1. /*
  2.  * bounce.h -- description of Bounce class.
  3.  */
  4. #include <cdev.h>
  5. #include "LineBox.h"
  6.  
  7. /* default number of lines to bounce */
  8. #define NUM_LINES 20
  9.  
  10. struct Bounce : cdev {
  11.  
  12.     Handle        cursor;                /* cursor to display in in my pane */
  13.     LineBox        *lines;                /* bouncing line object */
  14.  
  15.     /* Methods to override */
  16.  
  17.     long        Message(int msg, int item);    /*    general message dispatch */
  18.     void        Init(void);            /*  "initDev"    */
  19.     void        Close(void);        /*  "closeDev"    */
  20.     void        Update(void);        /*  "updateDev"    */
  21.     void        ItemHit(int);        /*  "hitDev"    */
  22.     void        Idle(void);            /*  "nulDev"    */
  23.     
  24.     /* My methods */
  25.     
  26.     void        Cursor(void);        /*    "cursorDev"    */
  27.     void        About(void);        /* put up an about box */
  28.     Handle        ReadRsrc(OSType, int);    /* read a resouce & trap errors */
  29. };
  30.  
  31. enum MyItems {
  32.     AboutItem = 1,
  33.     TitleItem,
  34.     BounceItem
  35. };
  36.  
  37. enum AboutItems {
  38.     OKItem = 1,
  39.     NameItem,
  40.     DescripItem,
  41.     AboutBounceItem
  42. };
  43.  
  44. #ifndef NIL
  45. #define NIL ((void *)0L)
  46. #endif
  47.  
  48. #define cursorDev    14        /* from TN #215 */
  49. #define CURSID        (-4064)
  50. #define AboutID        (-4063)
  51.  
  52. void BounceAbout(DialogPtr, int, Rect *);
  53.